package com.example.mine_platform.controller.admin;

import com.example.mine_platform.commom.Result;
import com.example.mine_platform.pojo.dto.CheckClockDTO;
import com.example.mine_platform.pojo.entities.CheckClock;
import com.example.mine_platform.service.CheckClockService;
import com.github.pagehelper.PageInfo;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/admin")
@CrossOrigin(origins = "*")
public class CheckClockController {
    @Resource
    CheckClockService checkClockService;
    @GetMapping("/sign/search")
    Result getUser(@RequestParam(value="userName", required=false)String userName,
                   @RequestParam(value="pageSize", defaultValue="5")Integer pageSize,
                   @RequestParam(value="pageNum",  defaultValue="1")Integer pageNum){
        PageInfo<CheckClockDTO> infos=checkClockService.findBySearch(userName,pageSize,pageNum);
        return  Result.success(infos);
    }

}
